{% extends "base.html" %}

{% block body %}

<ol class="breadcrumb">
  <li>管理</li>
  <li class="active">编辑服务</li>
</ol>

<div class="page-header">
  <h2>编辑服务</h2>
</div>

<div class="static_page">
  <h3  class="modal-header">编辑服务</h3>
  <div class="modal-body">
    <form class="form-horizontal" role="form" action='/server/server_update' method="post">
      {% csrf_token %}
        <div class="row">
          <div class="col-sm-6 col-md-5">
              <p><strong>主机 </strong><span class="fa fa-asterisk"></span></p>
              <input type="text" name="host" class="form-control" value={{server.host}} readonly="readonly" required>
              </br>
              <p><strong>服务类型 </strong><span class="fa fa-asterisk"></span></p>
              <select class="form-control" name="server_type" readonly="readonly">
                <option>{{server_type}}</option>
              </select>
              </br>
              <p><strong>端口 </strong> </strong><span class="fa fa-asterisk"></span></p>
              <input type="text" name="port" class="form-control" value={{server.port}}>
              </br>
              <p><strong>登录账户 </strong></p>
              <input type="text" name="username" class="form-control" value={{server.username}}>
              </br>
              <p><strong>登录密码 </strong></span></p>
              <input type="password" name="password" class="form-control">
              </br>
              <p><strong>接口用户名 </strong></p>
              <input type="text" name="username_api" class="form-control" value={{server.username_api}}>
              </br>
              <p><strong>接口密码 </strong></span></p>
              <input type="password" name="password_api" class="form-control">
              </br>
              <p><strong>接口端口 </strong></p>
              <input type="text" name="port_api" class="form-control" value={{server.port_api}}>
              </br>
              <p><strong>接口协议 </strong></p>
              <input type="text" name="protocal_api" class="form-control" value={{server.protocal_api}}>
              </br>
              <p><strong>文件根目录t </strong></p>
              <input type="text" name="file_path_root" class="form-control" value={{server.file_path_root}}>
              </br>
              <p><strong>描述 </strong></p>
              <input type="text" name="description" class="form-control" value="{{server.description}}">
              </br>
              {% if message %}
                  <div class="alert alert-warning">{{ message }}</div>
              {% endif %}
              </br>
          </div>
          <div class="col-sm-6">
            <h3>描述:</h3>
            <p>创建一个新的服务并设置相关属性</p>
          </div>
        </div>
      <div class="modal-footer"><button class="btn btn-primary" type="submit">提交</button></div>
  </form>
</div>
</div>
{% endblock %}